<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>用户登录</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
<meta name="format-detection" content="telephone=no">
<meta name="renderer" content="webkit">
<meta http-equiv="Cache-Control" content="no-siteapp" />
<link rel="stylesheet" href="css/amazeui.min.css"/>
<link rel="stylesheet" href="default/style.css"/>
<script src="js/jquery.min.js"></script>
<script src="js/amazeui.min.js"></script>
    <script src="js/common.js"></script>
    <script src="js/normal-config.js"></script>
    <link rel="stylesheet" href="layui/css/layui.mobile.css">
    <script src="layui/layui.all.js"></script>
</head>

<body>
<div class="container">
	<header data-am-widget="header" class="am-header am-header-default my-header">
      <div class="am-header-left am-header-nav">
        <a href="#left-link" class="">
          <i class="am-header-icon am-icon-chevron-left"></i>
        </a>
      </div>
      <h1 class="am-header-title">
        <a href="#title-link" class="">用户登录</a>
      </h1>
      <div class="am-header-right am-header-nav">
        <a href="#right-link" class="">
          <i class="am-header-icon  am-icon-home"></i>
        </a>
      </div>
    </header>
    <div class="cart-panel">
		<form class="am-form">
            <div class="am-form-groupClient am-form-icon">
                <i class="am-icon-user" style="color:#329cd9"></i>
                <input type="text" id="name" class="am-form-field  my-radius" placeholder="请输入您的用户名">
            </div>
            <div class="am-form-groupClient am-form-icon">
                <i class="am-icon-lock" style="color:#329cd9"></i>
                <input type="password" id="password" class="am-form-field  my-radius" placeholder="请输入您的密码">
            </div>
            <div class="am-checkbox">
              <label>
                <input type="checkbox">记住密码
              </label>
            </div>
            <p class="am-text-center"><a id="login" class="am-btn am-btn-danger am-radius am-btn-block">立即登录</a></p>
        </form>
    </div>
    
    <footer data-am-widget="footer" class="am-footer am-footer-default" data-am-footer="{  }">
        <hr data-am-widget="divider" style="" class="am-divider am-divider-default"/>
      <div class="am-footer-miscs ">
        <p>CopyRight©2014 AllMobilize Inc.</p>
        <p>京ICP备13033158</p>
      </div>
    </footer>
    <!--底部-->
    <div data-am-widget="navbar" class="am-navbar am-cf my-nav-footer " id="">
      <ul class="am-navbar-nav am-cf am-avg-sm-4 my-footer-ul">
        <li>
          <a href="/wap/" class="">
            <span class="am-icon-home"></span>
            <span class="am-navbar-label">首页</span>
          </a>
        </li>
        <li>
          <a href="###" class="">
            <span class=" am-icon-phone"></span>
            <span class="am-navbar-label">电话</span>
          </a>
        </li>
        <li>
          <a href="###" class="">
            <span class=" am-icon-comments"></span>
            <span class="am-navbar-label">聊天</span>
          </a>
        </li>

      </ul>
      <script>
          new Global.Self({

              mounted: function () {
                  var that=this;
                 $('#login').click(function () {
                     that.chatlogin();
                 })
              },

              chatlogin:function () {
                  var names=$('#name').val();
                  var password=$('#password').val();
                  // var index=layer.load(1);
                  Global.service.chatlogin({"loginname":names,"password":password},function (data) {
                      // layer.close(index);
                      window.location.href="chat.html?userId="+data.result.id;
                  },function (err) {
                      layer.msg("登录失败");
                  })
              }

          });

	  </script>
    </div>
</div>
</body>
</html>
